import { http } from "@/utils/http";

export const CreateMission = (
	data: Eps.OAService.CreateMission_Params = {}
): Promise<Eps.OAService.CreateMission> => {
	return http.post(`/OAService/CreateMission`, Object.values(data));
};

export const EditMission = (
	data: Eps.OAService.EditMission_Params = {}
): Promise<Eps.OAService.EditMission> => {
	return http.post(`/OAService/EditMission`, Object.values(data));
};

export const GetMissionTypes = (
	data: Eps.OAService.GetMissionTypes_Params = {}
): Promise<Eps.OAService.GetMissionTypes> => {
	return http.post(`/OAService/GetMissionTypes`, Object.values(data));
};

export const GetMyCreateMissions = (
	data: Eps.OAService.GetMyCreateMissions_Params = {}
): Promise<Eps.OAService.GetMyCreateMissions> => {
	return http.post(`/OAService/GetMyCreateMissions`, Object.values(data));
};

export const GetMyMissions = (
	data: Eps.OAService.GetMyMissions_Params = {}
): Promise<Eps.OAService.GetMyMissions> => {
	return http.post(`/OAService/GetMyMissions`, Object.values(data));
};

export const SetMissionStatus = (
	data: Eps.OAService.SetMissionStatus_Params = {}
): Promise<Eps.OAService.SetMissionStatus> => {
	return http.post(`/OAService/SetMissionStatus`, Object.values(data));
};

export const GetMissionAllReplies = (
	data: Eps.OAService.GetMissionAllReplies_Params = {}
): Promise<Eps.OAService.GetMissionAllReplies> => {
	return http.post(`/OAService/GetMissionAllReplies`, Object.values(data));
};

export const GetMissionReplies = (
	data: Eps.OAService.GetMissionReplies_Params = {}
): Promise<Eps.OAService.GetMissionReplies> => {
	return http.post(`/OAService/GetMissionReplies`, Object.values(data));
};

export const GetMissionRepliesV2 = (
	data: Eps.OAService.GetMissionRepliesV2_Params = {}
): Promise<Eps.OAService.GetMissionRepliesV2> => {
	return http.post(`/OAService/GetMissionRepliesV2`, Object.values(data));
};

export const Reply = (data: Eps.OAService.Reply_Params = {}): Promise<Eps.OAService.Reply> => {
	return http.post(`/OAService/Reply`, Object.values(data));
};

export const CreateTeam = (
	data: Eps.OAService.CreateTeam_Params = {}
): Promise<Eps.OAService.CreateTeam> => {
	return http.post(`/OAService/CreateTeam`, Object.values(data));
};

export const DeleteTeam = (
	data: Eps.OAService.DeleteTeam_Params = {}
): Promise<Eps.OAService.DeleteTeam> => {
	return http.post(`/OAService/DeleteTeam`, Object.values(data));
};

export const EditTeam = (
	data: Eps.OAService.EditTeam_Params = {}
): Promise<Eps.OAService.EditTeam> => {
	return http.post(`/OAService/EditTeam`, Object.values(data));
};

export const GetMyCreateTeams = (
	data: Eps.OAService.GetMyCreateTeams_Params = {}
): Promise<Eps.OAService.GetMyCreateTeams> => {
	return http.post(`/OAService/GetMyCreateTeams`, Object.values(data));
};

export const GetMyTeams = (
	data: Eps.OAService.GetMyTeams_Params = {}
): Promise<Eps.OAService.GetMyTeams> => {
	return http.post(`/OAService/GetMyTeams`, Object.values(data));
};
